<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
|	example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
|	http://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There area two reserved routes:
|
|	$route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
|	$route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router what URI segments to use if those provided
| in the URL cannot be matched to a valid route.
|
*/

$route['default_controller'] = 'public_page_c';

$route['home'] = 'public_page_c';
$route['home/(:any)'] = 'public_page_c/view_full_text/$1';
$route['about'] = 'public_page_c';
$route['program'] = 'public_page_c/program';
$route['achievements'] = 'public_page_c/achievements';

$route['authenticated/profile/(:num)'] = 'authenticated_page_c/profile/$1';
$route['authenticated/posts'] = 'authenticated_page_c';
$route['authenticated/groups'] = 'authenticated_page_c/groups';
$route['authenticated/groupnamesort'] = 'authenticated_page_c/sort_groups';
$route['authenticated/groups/(:any)'] = 'authenticated_page_c/one_group/$1';
$route['authenticated/unsubscribe/(:any)'] = 'authenticated_page_c/unsubscribe_to/$1';
$route['authenticated/confirm/(:any)'] = 'authenticated_page_c/confirm_unsubscribe/$1';
$route['authenticated/subscribe/(:any)'] = 'authenticated_page_c/subscribe_to/$1';
$route['authenticated/posts/read_full_story/(:any)'] = 'authenticated_page_c/read_full_story/$1';

$route['authenticated/group/posts'] = 'authenticated_page_c/all_group_post';
$route['authenticated/group/post/filter/(:any)'] = 'authenticated_page_c/all_group_post_by_year/$1';
$route['authenticated/group_post/(:num)'] = 'authenticated_page_c/bulletin_by_group/$1';
$route['authenticated/group_post/(:num)/filter_by_month/(:any)'] = 'authenticated_page_c/bulletin_group_by_month/$1,$2';
$route['authenticated/group_post/read_full_story/(:any)'] = 'authenticated_page_c/read_full_story/$1';
$route['authenticated/group/(:any)'] = 'authenticated_page_c/one_group/$1';
$route['authenticated/bulletin/posts'] = 'authenticated_page_c/all_bulletin_post';
$route['authenticated/bulletin/read_full_story/(:any)'] = 'authenticated_page_c/read_full_story/$1';
$route['authenticated/bulletin/filter_by_month/(:any)'] = 'authenticated_page_c/bulletin_by_month/$1';
$route['authenticated/bulletin/posts/filter_by_year/(:num)'] = 'authenticated_page_c/filter_bulletin_post_by_year/$1';
$route['authenticated/filter_by_year/(:num)/(:any)'] = 'authenticated_page_c/filter_bulletin_post_by_year/$1/$2';
$route['authenticated/posts/read_full_story/(:any)'] = 'authenticated_page_c/read_full_story/$1';
#$route['authenticated/bulletin/posts/filter_by_year/(:num)/(:num)'] = 'authenticated_page_c/filter_bulletin_post_by_year/$1';

$route['authenticated/asd/(:any)'] = 'authenticated_page_c/hey/$1';

$route['login'] = 'login_c';
$route['login/validate'] = 'login_c/login';
$route['admin'] = 'dashboard_c';
$route['user'] = 'post_c/show_content';
$route['logout'] ='post_c/logout';

$route['dashboard'] = 'dashboard_c';
$route['dashboard/create_category'] = 'dashboard_c/create_category';
$route['dashboard/create_department'] = 'dashboard_c/create_department';
$route['dashboard/create_role'] = 'dashboard_c/create_role';
$route['dashboard/create_course'] = 'dashboard_c/create_course';
$route['dashboard/edit_category/(:any)'] = 'dashboard_c/edit_cat_rol_dep_cor/$1';
$route['dashboard/edit_department/(:any)'] = 'dashboard_c/edit_cat_rol_dep_cor/$1';
$route['dashboard/edit_role/(:any)'] = 'dashboard_c/edit_cat_rol_dep_cor/$1';
$route['dashboard/edit_course/(:any)'] = 'dashboard_c/delete_course/$1';
$route['dashboard/delete_category/(:any)'] = 'dashboard_c/delete_category/$1';
$route['dashboard/delete_dept/(:any)'] = 'dashboard_c/delete_dept/$1';
$route['dashboard/delete_role/(:any)'] = 'dashboard_c/delete_role/$1';
$route['dashboard/delete_course/(:any)'] = 'dashboard_c/delete_course/$1';

$route['post'] = 'post_c';
$route['post/create'] = 'post_c/create_post';
$route['post/edit/(:any)'] = 'post_c/edit_post/$1';
$route['post/delete/(:any)'] = 'post_c/delete_post/$1';
$route['post/pending/approve/(:any)'] = 'post_c/approve_pending_post/$1';
$route['post/pending/approve_now/(:any)'] = 'post_c/approve_pending_post_now/$1';
$route['post/pending/reject/(:any)'] = 'post_c/reject_pending_post/$1';
$route['post/pending/view'] = 'post_c/show_pending_post';
$route['post/draft/publish/(:any)'] = 'post_c/publish_draft_post/$1';
$route['post/draft/delete/(:any)'] = 'post_c/delete_draft_post/$1';
$route['post/draft/edit/(:any)'] = 'post_c/edit_draft_post/$1';
$route['post/draft/(:any)'] = 'post_c/show_draft_post/$1';
$route['post/sort_draft/(:num)/title/(:any)'] = 'post_c/sort_draft_post/$1/$2';
$route['post/trash'] = 'post_c/post_trash';
$route['post/trash/recover/(:any)'] = 'post_c/recover_trashed_post/$1';
$route['post/trash/delete/(:any)'] = 'post_c/delete_trashed_post/$1';
$route['post/rejected'] = 'post_c/show_rejected_post';
$route['post/rejected/edit/(:any)'] = 'post_c/reject_edit_post/$1';

$route['users'] = 'user_c';
#$route['users/sort/(:any)/(:any)'] = 'user_c';
#$route['users/(:any)/(:any)/index/(:num)'] = 'user_c';
$route['user/upload_file'] = 'user_c/upload';
$route['user/upload'] = 'user_c/upload_file';
$route['user/edit/(:any)'] = 'user_c/edit_user/$1';
$route['user/delete/(:any)'] = 'user_c/delete_user/$1';
$route['user/delete_update'] = 'user_c/delete_user_update_role';
#$route['users/update/(:any)'] = 'user_c/update_user_admin/$1';
$route['register/employee'] = 'user_c/register_emp';
$route['register/student'] = 'user_c/register_stud';
$route['register/admin'] = 'user_c/view_reg_admin';
$route['register/stud'] = 'user_c/view_reg_stud';
$route['register/emp'] = 'user_c/view_reg_emp';
$route['register/validate/admin'] = 'user_c/reg_admin';
$route['register/validate/student'] = 'user_c/reg_stud';
$route['register/validate/employee'] = 'user_c/reg_emp';

$route['groups'] = 'groups_c';
$route['groups/create'] = 'groups_c/create_group';
$route['groups/edit/(:any)'] = 'groups_c/edit_group/$1';
$route['groups/manage/(:any)'] = 'groups_c/manage/$1';
$route['groups/delete/(:any)'] = 'groups_c/sure_delete/$1';

//for security
$route['groups_c'] = 'index';
$route['groups_c/create_group'] = 'index';
$route['groups_c/edit_group'] = 'index';
$route['groups_c/manage'] = 'index';

/* End of file routes.php */
/* Location: ./application/config/routes.php */
